package com.yu1996.gulimall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yu1996.common.utils.PageUtils;
import com.yu1996.gulimall.ware.entity.WareSkuEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品库存
 *
 * @author yu
 * @email 1798121567@qq.com
 * @date 2021-08-06 15:40:02
 */
public interface WareSkuService extends IService<WareSkuEntity> {

  PageUtils queryPage(Map<String, Object> params);

  /**
   * 增加商品库存
   *
   * @param skuId 菜单项id
   * @param wareId 仓库id
   * @param skuNum 商品采购量
   */
  void addStock(Long skuId, Long wareId, Integer skuNum);

  /**
   * 根据skuid批量查找库存数
   *
   * @param skuIds
   * @return
   */
  Map<Long, Long> getSkusHasStock(List<Long> skuIds);
}
